package com.weyoung.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.weyoung.common.model.entity.UserDO;
import com.weyoung.common.model.vo.app.UserDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<UserDO> {
     @Select("SELECT family_id FROM user WHERE user_id = #{userId}")
    String getFamilyIdByUserId(Integer userId);


    List<UserDetailVO> getAllFamilyMembers(String familyId);

    UserDetailVO getUserDetailById(Integer userId);
}